package com.tct.smartRE.fwk.domain;

import java.util.List;

public class Property extends BusinessObject {
	private String title;
	private String description;
	private double totalAmount;
	private String address;
	private String postCode;
	private ItemCode state;
	private ItemCode country;
	private int bedrooms;
	private int bathrooms;
	private int square;
	private ItemCode parkingType;
	private ItemCode laundryType;
	private ItemCode rangeType;
	private ItemCode heatType;
	private String amenities;
	private List<Photo> photos;
	private String video;
	
	private User user;
	
	public Property() {
	}

	/**
	 * @param title the title to set
	 */
	public void setTitle(String title) {
		this.title = title;
	}

	/**
	 * @return the title
	 */
	public String getTitle() {
		return title;
	}

	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param totalAmount the totalAmount to set
	 */
	public void setTotalAmount(double totalAmount) {
		this.totalAmount = totalAmount;
	}

	/**
	 * @return the totalAmount
	 */
	public double getTotalAmount() {
		return totalAmount;
	}

	/**
	 * @param address the address to set
	 */
	public void setAddress(String address) {
		this.address = address;
	}

	/**
	 * @return the address
	 */
	public String getAddress() {
		return address;
	}

	/**
	 * @param postCode the postCode to set
	 */
	public void setPostCode(String postCode) {
		this.postCode = postCode;
	}

	/**
	 * @return the postCode
	 */
	public String getPostCode() {
		return postCode;
	}

	/**
	 * @param state the state to set
	 */
	public void setState(ItemCode state) {
		this.state = state;
	}

	/**
	 * @return the state
	 */
	public ItemCode getState() {
		return state;
	}

	/**
	 * @param country the country to set
	 */
	public void setCountry(ItemCode country) {
		this.country = country;
	}

	/**
	 * @return the country
	 */
	public ItemCode getCountry() {
		return country;
	}

	/**
	 * @param bedrooms the bedrooms to set
	 */
	public void setBedrooms(int bedrooms) {
		this.bedrooms = bedrooms;
	}

	/**
	 * @return the bedrooms
	 */
	public int getBedrooms() {
		return bedrooms;
	}

	/**
	 * @param bathrooms the bathrooms to set
	 */
	public void setBathrooms(int bathrooms) {
		this.bathrooms = bathrooms;
	}

	/**
	 * @return the bathrooms
	 */
	public int getBathrooms() {
		return bathrooms;
	}

	/**
	 * @param square the square to set
	 */
	public void setSquare(int square) {
		this.square = square;
	}

	/**
	 * @return the square
	 */
	public int getSquare() {
		return square;
	}

	/**
	 * @param parkingType the parkingType to set
	 */
	public void setParkingType(ItemCode parkingType) {
		this.parkingType = parkingType;
	}

	/**
	 * @return the parkingType
	 */
	public ItemCode getParkingType() {
		return parkingType;
	}

	/**
	 * @param laundryType the laundryType to set
	 */
	public void setLaundryType(ItemCode laundryType) {
		this.laundryType = laundryType;
	}

	/**
	 * @return the laundryType
	 */
	public ItemCode getLaundryType() {
		return laundryType;
	}

	/**
	 * @param rangeType the rangeType to set
	 */
	public void setRangeType(ItemCode rangeType) {
		this.rangeType = rangeType;
	}

	/**
	 * @return the rangeType
	 */
	public ItemCode getRangeType() {
		return rangeType;
	}

	/**
	 * @param heatType the heatType to set
	 */
	public void setHeatType(ItemCode heatType) {
		this.heatType = heatType;
	}

	/**
	 * @return the heatType
	 */
	public ItemCode getHeatType() {
		return heatType;
	}

	/**
	 * @param amenities the amenities to set
	 */
	public void setAmenities(String amenities) {
		this.amenities = amenities;
	}

	/**
	 * @return the amenities
	 */
	public String getAmenities() {
		return amenities;
	}

	/**
	 * @param photos the photos to set
	 */
	public void setPhotos(List<Photo> photos) {
		this.photos = photos;
	}

	/**
	 * @return the photos
	 */
	public List<Photo> getPhotos() {
		return photos;
	}

	/**
	 * @param video the video to set
	 */
	public void setVideo(String video) {
		this.video = video;
	}

	/**
	 * @return the video
	 */
	public String getVideo() {
		return video;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public User getUser() {
		return user;
	}
	
	public String getFullAddress() {
		String rs ="";
		if(getAddress() != null && getAddress().length() != 0) {
			rs += getAddress() +",";
		}
		if(getState() != null) {
			rs += getState().getCode() +",";
		}
		if(getCountry() != null) {
			rs += getCountry().getCode();
		}
		return rs.replace("\r\n", "");
	}
}
